*******************************************************************************
*                                                                             *
* Why Dominant Governing Parties Are Cross-Nationally Influential             *
*                                                                             *
* Supplementary Materials: Robustness Checks                                  *
*                                                                             *  
* Tobias Böhmelt, Lawrence Ezrow, Petra Schleiter, Roni Lehrer, and Hugh Ward *
*                                                                             *
* This Version: July 12, 2017                                                 *
*                                                                             *
* Address Correspondence to: tbohmelt@essex.ac.uk                             *
*                                                                             *
*******************************************************************************

**************
* Data Setup *
**************

clear
set matsize 8000
set more off

use "Final Data ISQ.dta", clear

************
* Table A1 *
************

spatwmat using "for_inc_seat76051.dta", name(W)
splagvar rile_lag_term, wname(W) wfrom(Stata)
rename wy_rile_lag_term wy_foreign_incumb_v_share

global Y rile
global X lag_rile lag_cmedian lag_econ_glob interaction party_fe1-party_fe18 party_fe20-party_fe215 year_fe1-year_fe33

reg $Y wy_foreign_incumb_v_share $X 
reg $Y wy_domestic wy_foreign_incumb_v_share $X 
reg $Y wy_domestic wy_domestic_fam wy_foreign_incumb_v_share $X 

************
* Table A2 *
************

use "Final Data ISQ.dta", clear

spatwmat using "portfolio_1L.dta", name(W)
splagvar rile_lag_term, wname(W) wfrom(Stata)
rename wy_rile_lag_term wy_foreign_incumb_v_share

global Y rile
global X lag_rile lag_cmedian lag_econ_glob interaction party_fe1-party_fe18 party_fe20-party_fe215 year_fe1-year_fe33

reg $Y wy_foreign_incumb_v_share $X 
reg $Y wy_domestic wy_foreign_incumb_v_share $X 
reg $Y wy_domestic wy_domestic_fam wy_foreign_incumb_v_share $X 

************
* Table A3 *
************

use "Final Data ISQ.dta", clear

spatwmat using "pop_vshare.dta", name(W)
splagvar rile_lag_term, wname(W) wfrom(Stata)
rename wy_rile_lag_term wy_foreign_incumb_v_share

global Y rile
global X lag_rile lag_cmedian lag_econ_glob interaction party_fe1-party_fe18 party_fe20-party_fe215 year_fe1-year_fe33

reg $Y wy_foreign_incumb_v_share $X 
reg $Y wy_domestic wy_foreign_incumb_v_share $X 
reg $Y wy_domestic wy_domestic_fam wy_foreign_incumb_v_share $X 

************
* Table A4 *
************

use "Final Data ISQ.dta", clear

spatwmat using "foreign_incumb_v_share76051.dta", name(W)
splagvar rile_lag_term, wname(W) wfrom(Stata)
rename wy_rile_lag_term wy_foreign_incumb_v_share

global Y rile
global X lag_rile lag_cmedian lag_econ_glob interaction party_fe1-party_fe18 party_fe20-party_fe215 year_fe1-year_fe33

reg $Y wy_foreign_incumb_v_share lag_unemployment lag_gdp_growth lag_inflation $X 
reg $Y wy_domestic wy_foreign_incumb_v_share lag_unemployment lag_gdp_growth lag_inflation $X 
reg $Y wy_domestic wy_domestic_fam wy_foreign_incumb_v_share lag_unemployment lag_gdp_growth lag_inflation $X 

************
* Table A5 *
************

use "Final Data ISQ.dta", clear

spatwmat using "foreign_incumb_v_share76051.dta", name(W)
splagvar rile_lag_term, wname(W) wfrom(Stata)
rename wy_rile_lag_term wy_foreign_incumb_v_share

global Y rile
global X lag_rile lag_cmedian lag_econ_glob interaction party_fe1-party_fe18 party_fe20-party_fe215 year_fe1-year_fe33

reg $Y wy_domestic wy_domestic_fam wy_foreign_incumb_v_share cold_war $X 
reg $Y wy_domestic wy_domestic_fam wy_foreign_incumb_v_share eu_member $X 
reg $Y wy_domestic wy_domestic_fam wy_foreign_incumb_v_share terrorism $X 

************
* Table A6 *
************

use "Final Data ISQ.dta", clear

spatwmat using "foreign_incumb_v_share76051.dta", name(W)
splagvar rile_lag_term, wname(W) wfrom(Stata)
rename wy_rile_lag_term wy_foreign_incumb_v_share

global Y rile
global X lag_rile lag_cmedian lag_econ_glob interaction party_fe1-party_fe18 party_fe20-party_fe215 year_fe1-year_fe33

reg $Y wy_foreign_incumb_v_share $X if quart1==1
reg $Y wy_domestic wy_foreign_incumb_v_share $X if quart1==1
reg $Y wy_domestic wy_domestic_fam wy_foreign_incumb_v_share $X if quart1==1

************
* Table A7 *
************

use "Final Data ISQ.dta", clear

spatwmat using "domestic76051.dta", name(W)
splagvar lag_rile, wname(W) wfrom(Stata)
replace wy_domestic=wy_lag_rile
drop wy_lag_rile

spatwmat using "domestic_fam76051.dta", name(W)
splagvar lag_rile, wname(W) wfrom(Stata)
replace wy_domestic_fam=wy_lag_rile
drop wy_lag_rile

spatwmat using "for_inc_vshare176051.dta", name(W)
splagvar lag_rile, wname(W) wfrom(Stata)
rename wy_lag_rile wy_for_inc_vshare

global Y rile
global X lag_rile lag_cmedian lag_econ_glob interaction party_fe1-party_fe18 party_fe20-party_fe215 year_fe1-year_fe33

reg $Y wy_domestic wy_domestic_fam wy_for_inc_vshare $X 

use "Final Data ISQ.dta", clear

spatwmat using "domestic76051.dta", name(W)
splagvar lag2_rile, wname(W) wfrom(Stata)
replace wy_domestic=wy_lag2_rile
drop wy_lag2_rile

spatwmat using "domestic_fam76051.dta", name(W)
splagvar lag2_rile, wname(W) wfrom(Stata)
replace wy_domestic_fam=wy_lag2_rile
drop wy_lag2_rile

spatwmat using "for_inc_vshare276051.dta", name(W)
splagvar lag2_rile, wname(W) wfrom(Stata)
rename wy_lag2_rile wy_for_inc_vshare

global Y rile
global X lag_rile lag_cmedian lag_econ_glob interaction party_fe1-party_fe18 party_fe20-party_fe215 year_fe1-year_fe33

reg $Y wy_domestic wy_domestic_fam wy_for_inc_vshare $X 

use "Final Data ISQ.dta", clear

spatwmat using "domestic76051.dta", name(W)
splagvar lag3_rile, wname(W) wfrom(Stata)
replace wy_domestic=wy_lag3_rile
drop wy_lag3_rile

spatwmat using "domestic_fam76051.dta", name(W)
splagvar lag3_rile, wname(W) wfrom(Stata)
replace wy_domestic_fam=wy_lag3_rile
drop wy_lag3_rile

spatwmat using "for_inc_vshare376051.dta", name(W)
splagvar lag3_rile, wname(W) wfrom(Stata)
rename wy_lag3_rile wy_for_inc_vshare

global Y rile
global X lag_rile lag_cmedian lag_econ_glob interaction party_fe1-party_fe18 party_fe20-party_fe215 year_fe1-year_fe33

reg $Y wy_domestic wy_domestic_fam wy_for_inc_vshare $X 
